package com.jnu.accounthelper.db;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Account implements Serializable {
    private int id;
    private  String type;
    private String remark;
    private int number;
    private int CoverResourceId;
    private String source;
    private String date;

    //@RequiresApi(api = Build.VERSION_CODES.O)
    public Account(String title, String remark, int number, int CoverResourceId, String source){
        this.type=title;
        this.remark=remark;
        this.number=number;
        this.CoverResourceId=CoverResourceId;
        this.source=source;
        Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month= c.get(Calendar.MONTH);
        int day= c.get(Calendar.DATE);
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日");
        this.date=sdf.format(new Date());
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getCoverResourceId() {
        return CoverResourceId;
    }

    public void setCoverResourceId(int coverResourceId) {
        CoverResourceId = coverResourceId;
    }

    public String getType() {
        return type;
    }
    public void setType(String title){
        this.type=title;
    }
}
